﻿<UserControls:ScrumUserControl x:Class="ScrumTable.UI.View.WinTouch.UserControls.View.ProjectPlanningUserStories"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"           
    xmlns:s="clr-namespace:Microsoft.Surface.Presentation;assembly=Microsoft.Surface.Presentation"    
    xmlns:ViewModel="clr-namespace:ScrumTable.UI.ViewModel;assembly=ScrumTable.UI.ViewModel"    
    xmlns:Localization="clr-namespace:ScrumTable.UI.View.Localization;assembly=ScrumTable.UI.View" xmlns:UserControls="clr-namespace:ScrumTable.UI.View.WinTouch.UserControls">
    <Grid>

        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="0.8*"></RowDefinition>
            <RowDefinition Height="0.2*"></RowDefinition>
        </Grid.RowDefinitions>

        
        <Label x:Name="lblMust" FontSize="60" FontWeight="Bold" Opacity="0.25" AllowDrop="False" IsHitTestVisible="False" Panel.ZIndex="1" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.RowSpan="1">
            <Label.Content>
                <Localization:Translate Uid="ProjectPlanningUserStories_Must" Default="[Must]" />
            </Label.Content>
            <Label.LayoutTransform>
                <RotateTransform Angle="90"/>
            </Label.LayoutTransform>
        </Label>

        <Label x:Name="lblShould" FontSize="60" FontWeight="Bold" Opacity="0.25" AllowDrop="False" IsHitTestVisible="False" Panel.ZIndex="1" Grid.Column="1" Grid.Row="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
            <Label.Content>
                <Localization:Translate Uid="ProjectPlanningUserStories_Should" Default="[Should]" />
            </Label.Content>
            <Label.LayoutTransform>
                <RotateTransform Angle="90"/>
            </Label.LayoutTransform>
        </Label>

        <Label  x:Name="lblCould" FontSize="60" FontWeight="Bold" Opacity="0.25" AllowDrop="False" IsHitTestVisible="False" Panel.ZIndex="1" Grid.Column="2" Grid.Row="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
            <Label.Content>
                <Localization:Translate Uid="ProjectPlanningUserStories_Could" Default="[Could]" />
            </Label.Content>
            <Label.LayoutTransform>
                <RotateTransform Angle="90"/>
            </Label.LayoutTransform>
        </Label>
        
        <Label x:Name="lblNone" FontSize="60" FontWeight="Bold" Opacity="0.25" AllowDrop="False" IsHitTestVisible="False" Panel.ZIndex="1" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
            <Label.Content>
                <Localization:Translate Uid="ProjectPlanningUserStories_NotRanked" Default="[Not Ranked]" />
            </Label.Content>

        </Label>
        
        <UserControls:SurfaceDragDropListBox x:Name="UserStorieListMust" Grid.Column="0"
            AllowDrop="True" IsItemSelectable="False"
            MultipleColumnsRows="True"                                            
            ItemsSource="{Binding Path=UserStoriesMust}" s:SurfaceDragDrop.Drop="OnMustDrop" >
            <UserControls:SurfaceDragDropListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <UserControls:ScrumItemControl DataContext="{Binding}" />
                    </StackPanel>
                </DataTemplate>
            </UserControls:SurfaceDragDropListBox.ItemTemplate>
        </UserControls:SurfaceDragDropListBox>


        <UserControls:SurfaceDragDropListBox x:Name="UserStorieListShould" Grid.Column="1"
            AllowDrop="True" IsItemSelectable="False"
            MultipleColumnsRows="True"                                           
            s:SurfaceDragDrop.Drop="OnShouldDrop"
            ItemsSource="{Binding Path=UserStoriesShould}"  >
            <UserControls:SurfaceDragDropListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <UserControls:ScrumItemControl DataContext="{Binding}" />
                    </StackPanel>
                </DataTemplate>
            </UserControls:SurfaceDragDropListBox.ItemTemplate>
        </UserControls:SurfaceDragDropListBox>

        <UserControls:SurfaceDragDropListBox x:Name="UserStorieListCould" Grid.Column="2"
            AllowDrop="True" IsItemSelectable="False"
            MultipleColumnsRows="True" 
            s:SurfaceDragDrop.Drop="OnCouldDrop"                       
            ItemsSource="{Binding Path=UserStoriesCould}">
            <UserControls:SurfaceDragDropListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <UserControls:ScrumItemControl DataContext="{Binding}" />
                    </StackPanel>
                </DataTemplate>
            </UserControls:SurfaceDragDropListBox.ItemTemplate>
        </UserControls:SurfaceDragDropListBox>



        <UserControls:SurfaceDragDropListBox x:Name="UserStorieListNone" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" 
            AllowDrop="True" IsItemSelectable="False"
            Orientation="Horizontal"
            s:SurfaceDragDrop.Drop="OnNoneDrop"                                               
            MultipleColumnsRows="True"
            ItemsSource="{Binding Path=UserStoriesNone}"
            AllowedDropType="{x:Type ViewModel:UserStoryViewModel}">
            <UserControls:SurfaceDragDropListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <UserControls:ScrumItemControl DataContext="{Binding}" />
                    </StackPanel>
                </DataTemplate>
            </UserControls:SurfaceDragDropListBox.ItemTemplate>
        </UserControls:SurfaceDragDropListBox>
        <UserControls:AddButton  ButtonType="Story" Height="32" Width="32" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Top" Click="OnAddStoryClick"></UserControls:AddButton>
    </Grid>
</UserControls:ScrumUserControl>
